import React, {Component} from 'react';

import Item from "../Item";

import './index.css'

class List extends Component {


    render() {

        // 接收传来的事件
        const {todoList,deleteTodo,check}=this.props

        return (
            <ul className="todo-main" >
                { todoList.map((item)=>{
                    return <Item key={item.id} {...item} deletetodo={deleteTodo} check={check}></Item>
                })}
            </ul>
        );
    }
}

export default List;